﻿using DAL;
using DAL.DisinfectDAL;
using DAL.Entities;
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace BLL.DisinfectBLL
{
    /// <summary>
    /// 消毒记录
    /// </summary>
    public class DisinfectBLL
    {
        public readonly DisinfectDAL _disinfect;
        public DisinfectBLL()
        {
            _disinfect = new DisinfectDAL();
        }

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">新增实体</param>
        /// <returns></returns>
        public bool Add(DisinfectModel model)
        {
            return _disinfect.Add(model);
        }

        public IEnumerable<DisinfectModel> GetPagedList(int pageIndex, int pageSize, string deptId, string userId, string areaName, string startTime,string endTime, string userName, out int allCount)
        {
            return _disinfect.GetPagedList(pageIndex, pageSize, deptId, userId, areaName,startTime, endTime, userName, out allCount);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool Del(string id)
        {
            return _disinfect.Del(id);
        }

        /// <summary>
        /// 查询详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DisinfectModel GetDetail(string id)
        {
            return _disinfect.GetDetail(id);
        }

        public bool Update(DisinfectModel model)
        {
            return _disinfect.Update(model);
        }
    }
}
